package org.jadestudio.dsdown.action;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.jadestudio.dsdown.service.ManageLoginService;
import org.springframework.stereotype.Component;
@Component(value="/jadestudio/loginOut")
public class ManageLoginOutAction extends Action {
	@Resource
	private ManageLoginService manageLoginService;
	private ActionForward forward;
	public ManageLoginOutAction(){}
	/**
	 * 用户登出
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
		manageLoginService.userLoginOut(request);
		forward = new ActionForward("/jadestudio/portal.do");
		forward.setRedirect(true);
		return forward;//引导至登录页面
	}
}

